package com.kawins.loggers;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author kawins 所有需要打印日志的类继承该类
 **/
public abstract class Loggers {

	protected Logger log = LoggerFactory.getLogger(Loggers.class);

	public Loggers() {
		if (getLog() != null) {
			log = getLog();
		}
	}

	public abstract Logger getLog();

	public void info(String log) {
		getLog().info(log);
	}

	public void warn(String log) {
		getLog().warn(log);
	}

	public void error(String log) {
		getLog().error(log);
	}
}